﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.PersistenceModel.NHibernate.Specifications;
using YasharEl.Infrastructure.OrgUnit.PersistanceModel.Specifications;
using YasharEl.Infrastructure.Core.Personification;
using NHibernate.Criterion;

namespace YasharEl.Infrastructure.OrgUnit.PersistanceModel.NHibernate.Specifications
{
    public class EmployeeCriteriaSpecification : CriteriaSpecification<IEmployee, long>, IEmployeeSpecification
    {
        #region IEmployeeSpecification Implementations

        public IEmployeeSpecification WithEmployeeIdentityNumber(long employeeIdentityNumber)
        {
            this.Criteria.Add(Expression.Eq("IdentityNumber", new IsraelIdentityNumber(employeeIdentityNumber)));
            return this;
        }

        #endregion
    }
}
